
<!--
* description: 渠道小类弹出窗(仅网格)
* author: dxuem
* createdDate: 2019-11-25
-->
<template>
  <section class="carTypeConfig">
    <el-dialog v-dialogDrag
      title="渠道小类"
      :visible.sync="curPopupsVisible"
      width="1000px"
      center
      @close="sendCode"
      :close-on-click-modal="false"
      :append-to-body="true"
    >
      <dialogHeader
        slot="title"
        :title="'渠道小类'"
        :styleType="$store.state.app.dialogType"
      ></dialogHeader>
      <one-table-template
        ref="multipleTable"
        :dynamicButtons="tableButtons"
        :dynamicComponents="tableComponents"
        :dynamicApiConfig="apiConfig"
        :dynamicTableCols="tableCols"
        :dynamicFormFields="formField"
        :dynamicIsShowSelect="isMul"
        :dynamicIsInitTable="true"
      />
    </el-dialog>
  </section>
</template>
<script>
import { oneTableWithViewTemplateMixins } from "@/components/mixins/oneTableWithViewTemplateMixins";
import { valueObjectMixins } from "@/components/mixins/valueObjectMixins";
import { crmApis } from "@/api/apiList/crm";
import OneTableTemplate from "@/components/crm/commonComponents/crmPopupsOneTable";
export default {
  // 组件混入对象：{data[listQuery] methods[queryTable]}
  mixins: [oneTableWithViewTemplateMixins, valueObjectMixins],
  components: {
    OneTableTemplate,
    dialogHeader: () => import("@/components/dialogHeader") //弹窗标题
  },
  data() {
    return {
      // 网格查询API配置对象
      apiConfig: crmApis.pcDbInfoChanDQueryFind,
      // 动态生成网格列
      tableCols: [
        {
          prop: "controlBtn",
          label: "操作",
          codeField: "controlBtn",
          width: 60,
          align: "center",
          isComponent: true,
          fixed: true,
          comps: [
            {
              compKey: "propKey1",
              labelName: "选择",
              codeField: "editControlBtn",
              clickEvent: index => this.sendCode("custName", "custName"),
              component: () => import("@/components/org/linkButton"),
              align: "center"
            }
          ]
        },
        {
          prop: "infoChanMName",
          label: "渠道大类名称",
          width: null,
          align: "center"
        },
        {
          prop: "infoChanDName",
          label: "渠道小类名称",
          width: null,
          align: "center"
        },
        {
          prop: "infoChanDId",
          label: "infoChanDId",
          width: null,
          align: "center",
          hidden: true
        },
        {
          prop: "infoChanDCode",
          label: "infoChanDCode",
          width: null,
          align: "center",
          hidden: true
        },
      ],
      //表单查询数据（查询条件）
      formField: {
        infoChanMCode:"",
        oemCode:'1',
        groupCode:'1',
        isPv: "1",
        isEnable: "1"
      }
    };
  },
  mounted() {
    // this.formField.isEnable="1"
  },
  methods: {}
};
</script>
